VHL.Select
This command selects a card or tag in the antenna field for further operations. You need to run it successfully before you can use the following VHL commands:
Handling multiple cards in the antenna field
Using the Reselect parameter, you can interact with a card that you've already processed before (learn more in the Parameters section below).
Certain cards return random IDs. If 2 or more cards with random IDs AND the same card family are present in the antenna field at the same time, VHL.Select detects these cards more than once.
Potential error cases after selection
After running VHL.Select successfully, the above commands will usually be executed successfully, even if the card temporarily leaves the antenna field. Communication parameters such as bit rate and frame size are automatically chosen to optimize performance.
However, problems with certain cards (e.g. MIFARE proX/DESFire) may occur when they're in the border area of the antenna field and brought in very slowly. In these cases, VHL.Select may be executed successful, but the subsequent command may fail.
In this case, make sure your application guarantees a suitable card distance, either by user guidance or by repetition of the VHL.IsSelected command until its success. This is especially important in conjunction with the VHL.ExchangeAPDU command since it doesn't perform retries internally.
Properties
- Command code: 0x0100
- Command timeout: 3000 ms
- Possible status codes: General status codes, VHL.ErrNoTag, VHL.ErrHf, VHL.ConfcardRead, VHL.ErrHw, VHL.ErrApdu
Parameters (request frame)
Name | Type/Size | Description | |
---|---|---|---|
CardFamiliesFilter | Bit mask (16 bits) |
Selects the physical HF protocols that the reader will scan for cards. VHLSelect scans for the specified card families in a round-robin algorithm, i.e. the more card families you specify, the more time is needed to run a complete scan loop. Not all card types support all VHL commands. For details, see our overview of supported commands. |
|
RFU | Integer (bit mask area 0xF000) |
Zero padding |
|
LEGICPrime | Boolean (bit 0x0800) | - | |
BluetoothMce | Boolean (bit 0x0400) | - | |
Khz125Part2 | Boolean (bit 0x0200) | Scans for the following 125kHz cards: SecuraKey, G-Prox, Indala ASP+, Cotag, Idteck. To scan only for a part of this list, set the configuration value ScanCardTypesPart2 accordingly. To scan for other 125kHz card types, set the Khz125Part1 flag. | |
Srix | Boolean (bit 0x0100) | - | |
Khz125Part1 | Boolean (bit 0x0080) | Scans for the following 125kHz cards: EM4205, EM4305, EM4100, EM4102, EM4450, Farpointe Pyramid, HID prox, HID ioProx, HID Prox32, Keri, Quadrakey, Indala, AWID, HITAG 1 and S, HITAG 2, TTF (Tag talks first). To scan only for a part of this list, set the configuration value ScanCardTypesPart1 accordingly. To scan for other 125kHz card types, set the Khz125Part2 flag. | |
Felica | Boolean (bit 0x0040) | - | |
IClass | Boolean (bit 0x0020) |
Scans for iCLASS and iCLASS SR cards.
This flag does not include iCLASS SE or iCLASS Seos. To scan for these card types, set the Iso14443A flag. |
|
IClassIso14B | Boolean (bit 0x0010) |
Can be used instead of iCLASS to increase
scanning speed. (Its transport layer protocol is
based on the faster ISO 14443 Type B protocol
instead of the ISO-15693-like protocol of iCLASS
).
Not all iCLASS cards support ISO 14443 Type B. Thus, we recommend you use the iCLASS flag for maximum compatibility and the IClassIso14B flag for maximum speed. When in doubt, please check the specification of the cards used in your project. |
|
Iso14443B | Boolean (bit 0x0008) | - | |
Iso15693 | Boolean (bit 0x0004) | Scans for ISO-15693-compatible cards, e.g. EM4033, EM4035, NXP ICODE, or LEGIC advant ISO 15693. | |
RFU | Integer (bit 0x0002) |
Zero padding |
|
Iso14443A | Boolean (bit 0x0001) | Scans for ISO 14443 Type A compatible cards, e.g. MIFARE Classic, MIFARE Plus, MIFARE DESFire, NXP SmartMX, or Legic advant ISO 14443. | |
Reselect | Boolean (8 bits) |
If false, the reader will deselect the current card and select the next one in the field. Cards you've already selected before will be ignored. Once you've run through all the cards in the field, you'll get a VHL.ErrNoTag status code. Cards will be reselected again when they're removed from the antenna field and then enter it again. If true, the reader will "forget" which cards it has already selected since the last execution of VHL.Select and will start all over with the first card. This means that the same card is reselected over and over again, while other cards in the field are ignored. To avoid this and start reselection only when all cards in the field have been selected once, set Reselect to false until you get a VHL.ErrNoTag status. Then set Reselect to true. |
|
AcceptConfCard | Boolean (8 bits) |
This feature is deprecated and will be removed in future firmware releases. We recommend you set this flag to false. To support ConfigCards, please use Autoread. If true, the reader will scan every detected card and check if it's a BALTECH ConfigCard before returning from VHL.Select. Once the reader has found a ConfigCard, it will do the following:
Reading ConfigCards currently only works if legacy firmware support is enabled for the configuration. ConfigCards without legacy firmware support can currently only be read via Autoread. |
Returned values (response frame)
Name | Type/Size | Description | |
---|---|---|---|
SelectedCardType | Enumeration (8 bits) |
The type of the selected card. Since there are no reliable identification standards amongst card manufacturers, we use a heuristic that examines the UID, its length, and other information as documented here. Due to the lack of standards, we cannot guarantee the card type is always identified correctly. Values:
|